//
//  AppDelegate.m
//  Papaya_Comic
//
//  Created by Enrico zhang on 15-3-21.
//  Copyright (c) 2015年 Enrico_Zhang. All rights reserved.
//

#import "AppDelegate.h"
<<<<<<< HEAD
#import "SearchViewController.h"
=======
#import "Comic_Main.h"
#import "SearchViewController.h"
#import "ACGViewController.h"
#import "I_ViewController.h"

>>>>>>> 59f830d2f546be881c4560697d2e340c86fc57c7
@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    // Override point for customization after application launch.
    self.window.backgroundColor = [UIColor whiteColor];
    [self.window makeKeyAndVisible];
<<<<<<< HEAD
    [_window release];
    
    
    
    
    
    SearchViewController *searchVC = [[SearchViewController alloc] init];
    UINavigationController *naviVC = [[UINavigationController alloc] initWithRootViewController:searchVC];
    
    self.window.rootViewController = naviVC;
    [searchVC release];
    [naviVC release];
=======
    
    // 首页
    Comic_Main *mainVC = [[Comic_Main alloc]init];
    mainVC.title = @"首页";
    
    UINavigationController *mainNainVC = [[UINavigationController alloc]initWithRootViewController:mainVC];
    
    // 查找
    SearchViewController *searchVC = [[SearchViewController alloc]init];
    searchVC.title = @"查找";
    
    UINavigationController *searchNainVC = [[UINavigationController alloc]initWithRootViewController:searchVC];
    
    // ACG 资讯
    ACGViewController *acgVC = [[ACGViewController alloc]init];
    acgVC.title = @"ACG 图赏";
    
    UINavigationController *acgNainVC = [[UINavigationController alloc]initWithRootViewController:acgVC];
    
    // 我的
    I_ViewController *iVC = [[I_ViewController alloc]init];
    iVC.title = @"我的";
    
    UINavigationController *iVC_NainVC = [[UINavigationController alloc]initWithRootViewController:iVC];
    
    UITabBarController *tabBarVC = [[UITabBarController alloc]init];
    self.window.rootViewController = tabBarVC;
    tabBarVC.viewControllers = @[mainNainVC, acgNainVC, searchNainVC, iVC_NainVC];
    
    [mainVC release];
    [mainNainVC release];
    
    [searchVC release];
    [searchNainVC release];
    
    [acgVC release];
    [acgNainVC release];
    
    [iVC release];
    [iVC_NainVC release];
    
    [tabBarVC release];
>>>>>>> 59f830d2f546be881c4560697d2e340c86fc57c7
    
    
    return YES;
}
<<<<<<< HEAD
- (void)dealloc
{
    [_window release];
    [super dealloc];
}
=======

- (void)dealloc
{
    [self release];
    [super dealloc];
}

>>>>>>> 59f830d2f546be881c4560697d2e340c86fc57c7
- (void)applicationWillResignActive:(UIApplication *)application {
    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
    // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

- (void)applicationDidEnterBackground:(UIApplication *)application {
    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

- (void)applicationWillEnterForeground:(UIApplication *)application {
    // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}

- (void)applicationDidBecomeActive:(UIApplication *)application {
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

- (void)applicationWillTerminate:(UIApplication *)application {
    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

@end
